using System;
using System.Collections.Generic;

using TnPlus.Entities.Utils;
using TnPlus.Entities.Models;
using TnPlus.DAL;
using TnPlus.Common;

namespace TnPlus.Biz
{
	public class CallSMSHistoryService
	{
		/// <summary>
		/// Saves a record to the CallSMSHistory table.
		/// </summary>
		public virtual void Insert(CallSMSHistoryInfo callSMSHistoryInfo)
		{
			try
			{
				new CallSMSHistoryDAO().Insert(callSMSHistoryInfo);
			}
			catch (Exception ex)
			{
				Logger.Error("TnPlus.Biz.CallSMSHistory - Insert", ex);
				throw;
			}

		}

		/// <summary>
		/// Saves a record to the CallSMSHistory table.
		/// </summary>
		public virtual void Update(CallSMSHistoryInfo callSMSHistoryInfo)
		{
			try
			{
				new CallSMSHistoryDAO().Update(callSMSHistoryInfo);
			}
			catch (Exception ex)
			{
				Logger.Error("TnPlus.Biz.CallSMSHistory - Update", ex);
				throw;
			}

		}

		/// <summary>
		/// Delete a record from the CallSMSHistory table.
		/// </summary>
		public virtual void Delete(Guid? idCallSMS)
		{
			try
			{
				new CallSMSHistoryDAO().Delete(idCallSMS);
			}
			catch (Exception ex)
			{
				Logger.Error("TnPlus.Biz.CallSMSHistory - Delete", ex);
				throw;
			}

		}

		/// <summary>
		/// Selects a single record from the CallSMSHistory table.
		/// </summary>
		public virtual CallSMSHistoryInfo Select(Guid? idCallSMS)
		{
			try
			{
				return new CallSMSHistoryDAO().Select(idCallSMS);
			}
			catch (Exception ex)
			{
				Logger.Error("TnPlus.Biz.CallSMSHistory - Select", ex);
				throw;
			}

		}

		/// <summary>
		/// Selects all records from the CallSMSHistory table.
		/// </summary>
		public List<CallSMSHistoryInfo> SelectAll()
		{
			try
			{
				return new CallSMSHistoryDAO().SelectAll();
			}
			catch (Exception ex)
			{
				Logger.Error("TnPlus.Biz.CallSMSHistory - SelectAll", ex);
				throw;
			}

		}

	}
}
